package com.vogue.supplymall.order.domain.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Entity
@Table(name = "order_payment")
public class OrderPayment extends TendBaseEntity implements Serializable{
    /**
	 * 
	 */
	private static final long serialVersionUID = -8241570320036138193L;
	/**
     * 订单id
     */
    private Long orderid;
    /**
     * 支付金额
     */
    private BigDecimal amount;
    /**
     * 支付类型 0：线下支付 1：线上支付
     */
    private Integer paymenttype;
    /**
     * 支付方式 0：线下 1：吾享 2：微信 3：支付宝 4：预付货款
     */
    private Integer paymentmode;
    /**
     * 支付日期
     */
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @Column(
            updatable = true,
            nullable = true,
            columnDefinition = "DATETIME NULL COMMENT'支付日期'"
    )
    private Date paymentdate = new Date();
    /**
     * 支付编号
     */
    private String paymentnumber;
    /**
     * 归档状态 0：未归档 1：已归档
     */
    private Boolean archivestatus;

    /**
     * 撤销状态 0：未撤销 1：已撤销
     */
    private Boolean cancelstatus;
    
    /**
     * 账款到账延迟标识  默认0否, 1是
     */
    private Integer tsflag = 0;
    
    /**
     * 合并支付标识 默认 0否, 1是
     */
    private Integer mergeflag = 0;
    
    public Long getOrderid() {
        return orderid;
    }

    public void setOrderid(Long orderid) {
        this.orderid = orderid;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public Integer getPaymenttype() {
        return paymenttype;
    }

    public void setPaymenttype(Integer paymenttype) {
        this.paymenttype = paymenttype;
    }

    public Integer getPaymentmode() {
        return paymentmode;
    }

    public void setPaymentmode(Integer paymentmode) {
        this.paymentmode = paymentmode;
    }

    public Date getPaymentdate() {
        return paymentdate;
    }

    public void setPaymentdate(Date paymentdate) {
        this.paymentdate = paymentdate;
    }

    public String getPaymentnumber() {
        return paymentnumber;
    }

    public void setPaymentnumber(String paymentnumber) {
        this.paymentnumber = paymentnumber;
    }

    public Boolean getArchivestatus() {
        return archivestatus;
    }

    public void setArchivestatus(Boolean archivestatus) {
        this.archivestatus = archivestatus;
    }

	public Boolean getCancelstatus() {
		return cancelstatus;
	}

	public void setCancelstatus(Boolean cancelstatus) {
		this.cancelstatus = cancelstatus;
	}

    public Integer getTsflag() {
        return tsflag;
    }

    public void setTsflag(Integer tsflag) {
        this.tsflag = tsflag;
    }

    public Integer getMergeflag() {
        return mergeflag;
    }

    public void setMergeflag(Integer mergeflag) {
        this.mergeflag = mergeflag;
    }
}